package com.surekam.core;

import org.apache.commons.httpclient.HttpClient;
import org.apache.commons.httpclient.methods.PostMethod;

public class Main {
	public static void main(String[] args) throws Exception {
		HttpClient client = new HttpClient();
		
		PostMethod method = new PostMethod("https://api.baidu.com/sem/common/HolmesLoginService");
		method.addRequestHeader("USERNAME", "hn12396");
		method.addRequestHeader("PASSWORD", "hn12396Aa");
		method.addRequestHeader("TOKEN", "35a6601847299d7db0dd98a65966afd6");
		method.addRequestHeader("UUID", "1078D2C1E3E3");
		method.addRequestHeader("ACCOUNT_TYPE", "1");
		
		int status = client.executeMethod(method);
		String is = method.getResponseBodyAsString();
		System.out.println(status + "\n" + is);
		method.releaseConnection();
	}
	
	
}
